package com.borya.model.entity;


/**
 * 卡资源入库
 * @author borya
 *
 */
public class CardSource {
	
	private String sourceStr;//文本内容
	private boolean sourceTrue = true;//资源是否正确
	private int sourceLine;//资源行数
	
	private String iccid;
	private String iccid19;
	private String cardResourceId="";
	private String cardResourceIdJN="";
	private String cityCode="";
	private int cardType;//1远特2联通
	private int id;
	
	private String cardCompany;
	private int cardBelong;
	private String tfDealerId;
	private int deviceTpye;
	private String aid;

	public String getAid() {
		return aid;
	}

	public void setAid(String aid) {
		this.aid = aid;
	}

	public String getDescStr() {
		return descStr;
	}
	public void setDescStr(String descStr) {
		this.descStr = descStr;
	}
	private String descStr;
	public String getSourceStr() {
		return sourceStr;
	}
	public void setSourceStr(String sourceStr) {
		this.sourceStr = sourceStr;
	}
	public boolean isSourceTrue() {
		return sourceTrue;
	}
	public void setSourceTrue(boolean sourceTrue) {
		this.sourceTrue = sourceTrue;
	}
	public int getSourceLine() {
		return sourceLine;
	}
	public void setSourceLine(int sourceLine) {
		this.sourceLine = sourceLine;
	}
	public String getIccid() {
		return iccid;
	}
	public void setIccid(String iccid) {
		this.iccid = iccid;
	}
	public String getCardResourceId() {
		return cardResourceId;
	}
	public void setCardResourceId(String cardResourceId) {
		this.cardResourceId = cardResourceId;
	}
	public String getCardResourceIdJN() {
		return cardResourceIdJN;
	}
	public void setCardResourceIdJN(String cardResourceIdJN) {
		this.cardResourceIdJN = cardResourceIdJN;
	}
	public int getCardType() {
		return cardType;
	}
	public void setCardType(int cardType) {
		this.cardType = cardType;
	}
	public String getIccid19() {
		return iccid19;
	}
	public void setIccid19(String iccid19) {
		this.iccid19 = iccid19;
	}
	
	public void checkCardInfo(){
		if(19 != getIccid().length()
				&& 20 != getIccid().length()){
			setSourceTrue(false);
			setDescStr("iccid错误");
		}
	}
	public String getCityCode() {
		return cityCode;
	}
	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getCardCompany() {
		return cardCompany;
	}
	public void setCardCompany(String cardCompany) {
		this.cardCompany = cardCompany;
	}
	public int getCardBelong() {
		return cardBelong;
	}
	public void setCardBelong(int cardBelong) {
		this.cardBelong = cardBelong;
	}
	public String getTfDealerId() {
		return tfDealerId;
	}
	public void setTfDealerId(String tfDealerId) {
		this.tfDealerId = tfDealerId;
	}
	public int getDeviceTpye() {
		return deviceTpye;
	}
	public void setDeviceTpye(int deviceTpye) {
		this.deviceTpye = deviceTpye;
	}
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("CardSource [sourceStr=");
		builder.append(sourceStr);
		builder.append(", sourceTrue=");
		builder.append(sourceTrue);
		builder.append(", sourceLine=");
		builder.append(sourceLine);
		builder.append(", iccid=");
		builder.append(iccid);
		builder.append(", iccid19=");
		builder.append(iccid19);
		builder.append(", cardResourceId=");
		builder.append(cardResourceId);
		builder.append(", cardResourceIdJN=");
		builder.append(cardResourceIdJN);
		builder.append(", cityCode=");
		builder.append(cityCode);
		builder.append(", cardType=");
		builder.append(cardType);
		builder.append(", id=");
		builder.append(id);
		builder.append(", cardCompany=");
		builder.append(cardCompany);
		builder.append(", cardBelong=");
		builder.append(cardBelong);
		builder.append(", tfDealerId=");
		builder.append(tfDealerId);
		builder.append(", deviceTpye=");
		builder.append(deviceTpye);
		builder.append(", descStr=");
		builder.append(descStr);
		builder.append("]");
		return builder.toString();
	}
	
}
